
{***********************************************************}
{                                                           }
{      Informix Data Access Components                      }
{                                                           }
{      TIfxSQLProcessor component                           }
{                                                           }
{      Copyright (c) 2001-2008 Luxena Software Company      }
{      http://www.luxena.com                                }
{      e-mail: support@luxena.com                           }
{                                                           }
{***********************************************************}

unit IfxSQLProcessor;

{$I lx.inc}

interface

uses
  Classes, LXSQLProcessor;

type

{ TIfxSQLProcessor }

  TIfxSQLProcessor = class(TLXSQLProcessor)
  private
    function GetVersion: string;
    procedure SetVersion(const Value: string);
  protected
    procedure Loaded; override;
  public
    class function DefaultProcessor: TIfxSQLProcessor;
    constructor Create(AOwner: TComponent); override;
    procedure AfterConstruction; override;
    procedure BeforeDestruction; override;
  published
    property Version: string read GetVersion write SetVersion stored False;
  end;


implementation

uses SysUtils, IfxConsts, Ifx;


{ TIfxSQLProcessor }

var
  globalDefaultSQLProcessor: TIfxSQLProcessor;

class function TIfxSQLProcessor.DefaultProcessor: TIfxSQLProcessor;
begin
  Result := globalDefaultSQLProcessor;
end;

constructor TIfxSQLProcessor.Create(AOwner: TComponent);
begin
  inherited;
  OracleLob := False;
end;

procedure TIfxSQLProcessor.AfterConstruction;
begin
  inherited;
  TIDACEvents.HandleObjectCreate(Self);
end;

procedure TIfxSQLProcessor.BeforeDestruction;
begin
  TIDACEvents.HandleObjectDestroy(Self);
  inherited;
end;

procedure TIfxSQLProcessor.Loaded;
begin
  inherited;
  TIDACEvents.HandleObjectLoaded(Self);
end;

function TIfxSQLProcessor.GetVersion: string;
begin
  Result := IDACVersion;
end;

procedure TIfxSQLProcessor.SetVersion(const Value: string);
begin
end;


initialization
  globalDefaultSQLProcessor := TIfxSQLProcessor.Create(nil);

finalization
  FreeAndNil(globalDefaultSQLProcessor);

end.